-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Provide labels that are compartible with rules_python #89
fix: Provide labels that are compartible with rules_python #89
Conversation
@@ -201,8 +206,9 @@ def _package_repo_impl(rctx): | |||
_generate_lock_bzl(rctx, lock_json_path, lock_bzl_path) | |||
|
|||
for pin, pin_target in lock["pins"].items(): | |||
pin = pin.replace("-", "_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, not sure how this could be handled. Just wanted to demonstrate that it is possible.
Thanks. I actually gave the current layout a good amount of thought. Some of those thoughts are documented in comments in package_repo.bzl. The And for the dash vs. underscore situation: I decided to stick with python's own package normalization (described here), which is fully compatible with Bazel target names. So I won't accept this as is. Any change would have to be some alternative, configurable layout type, or some additional repo that can be added on top. Ideally we could just tell Gazelle how to find packages somehow, rather than it assuming a particular naming scheme. |
Telling Gazelle how to handle labels is a fair point. What are your thoughts on handling |
My plan is to put package binaries under But unlike rules_python where wheel contents can be analyzed in repository rules (and thus targets for entrypoint scripts can be created), pycross can't scan wheels and create targets in build rules. So any binaries/scripts that will be available under |
For how I am using this workaround to get the py_console_script going
|
Provide labels that are compatible with rules-python and python gazelle